<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>移动端</title>
    <link rel="stylesheet" href="css/mobile.css">
    <script>
        if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) == false) {
            //该页面不是在移动端打开的，
            window.location.href = "/admin/index.html?t=" + new Date().getTime();
        }
    </script>

</head>
<body>

<div class="index-content">
    <div class="index-content-item index-content-item-cur">
        <iframe src="mobile/index.html"></iframe>
    </div>
    <div class="index-content-item">
        <iframe src="mobile/work.html"></iframe>
    </div>
    <div class="index-content-item">
        <iframe src="mobile/me.html"></iframe>
    </div>
</div>

<div class="index-tab">
    <div class="index-tab-item index-tab-item-cur">首页</div>
    <div class="index-tab-item">工作台</div>
    <div class="index-tab-item">我</div>
</div>

<div class="mainFrame">
    <div class="mainFrame-title">
        <span class="mainFrame-title-back"> <返回 </span>
        <span class="mainFrame-title-text">标题</span>
    </div>
    <div class="mainFrame-content">
        <iframe src=""></iframe>
    </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script>
    $(".index-tab-item").click(function(){
        let index = $(".index-tab-item").index(this);
        $(".index-tab-item-cur").removeClass("index-tab-item-cur");
        $(this).addClass("index-tab-item-cur");
        $(".index-content-item-cur").removeClass("index-content-item-cur");
        $(".index-content-item").eq(index).addClass("index-content-item-cur");
    });
    $(".mainFrame-title-back").click(function(){
        $(".mainFrame").hide();
        // $(".mainFrame").animate({"top":"100%"})
    });
    function openFrame(title,src){
        $(".mainFrame-title-text").text(title);
        $(".mainFrame").show();
        // $(".mainFrame").animate({"top":"0"})
        $(".mainFrame-content iframe").attr("src",src)
    }
</script>
</body>
</html>
